import request from '@/config/axios'

export interface NetGroupPayOrderVO {
  id: number
  ownMemberUserId: number
  ownMemberMatCode: string
  memberUserId: number
  orderId: string
  merchantId: string
  terminalId: string
  instMid: string
  subAppid: string
  subOpenid: string
  tradeType: string
  netSysId: number
  lfApiUrl: string
  houseId: number,
  subject: string
  body: string
  amount: number
  accountAddrOflf: string
  platformFeeRate: number
  platformFeeAmount: number
  channelFeeRate: number
  channelFeeAmount: number
  balance: number
  status: number
  downNetFlag: number
  userIp: string
  expireTime: Date
  successTime: Date
  closeTime: Date
  notifyTime: Date
}

// 查询宽带批发订单列表
export const getNetGroupPayOrderPage = async (params) => {
  return await request.get({ url: `/zwsj/net-group-pay-order/page`, params })
}

// 查询宽带批发订单详情
export const getNetGroupPayOrder = async (id: number) => {
  return await request.get({ url: `/zwsj/net-group-pay-order/get?id=` + id })
}

// 删除宽带批发订单
export const deleteNetGroupPayOrder = async (id: number) => {
  return await request.delete({ url: `/zwsj/net-group-pay-order/delete?id=` + id })
}

// 导出宽带批发订单 Excel
export const exportNetGroupPayOrder = async (params) => {
  return await request.download({ url: `/zwsj/net-group-pay-order/export-excel`, params })
}

// 获取银联支付结果
export const getUnionMiniPayOrderInfo = async (NetGroupPayOrderId: number) => {
  return await request.get({
    url: `/zwsj/net-group-pay-order/union/pay/order/info?netPayOrderId=` + NetGroupPayOrderId
  })
}

// 根据充值订单查询充值账号列表
export const getNetGroupPayAccountLogPage = async (params) => {
  return await request.get({ url: `/zwsj/net-group-pay-order/page/payed/account`, params })
}